import request from '@/utils/request'

/**
 * 
 * @param {数据库配置} data 
 * @returns 
 */

//数据库配置分页查询
export const getList = (data) => {
  return request({
    url: '/data-base-config/selectByCondition?currentPage=' + data.currentPage + '&size=' + data.size,
    method: 'get'
  })
}

//查询数据库配置单条数据
export const selectOne = (data) => {
  return request({
    url: '/data-base-config/selectOne?id=' + data.id,
    method: 'get',
  })
}

//新增数据库配置数据
export const insertDatabase = (data) => {
  return request({
    url: '/data-base-config/insert',
    method: 'post',
    data
  })
}

//编辑数据库配置数据
export const updateDatabase = (data) => {
  return request({
    url: '/data-base-config/updateByCondition',
    method: 'post',
    data,
  })
}


//批量删除数据库配置
export const delateDatabase = (data) => {
  return request({
    url: '/data-base-config/batchDelete',
    method: 'post',
    data
  })
}

export const testDataBase = (data) => {
  return request({
    url: '/data-base-config/testConnection',
    method: 'post',
    data
  })
}




